package com.guet.news_main.controller;

import com.guet.common.utils.R;
import org.springframework.web.bind.annotation.*;

/**
 * @Classname BackLoginControll
 * @Description todo
 * @Date 2021/12/10 16:47
 * @Author csp
 */
@RestController
@RequestMapping("/news_main")
@CrossOrigin
public class BackLoginController {
    @PostMapping("/login")
    public R login(){
        return R.ok().data("token","admin");
    }
    @GetMapping("info")
    public R getInfo(){
        return R.ok().data("roles","[admin]").data("name","admin");
    }
    @PostMapping("logout")
    public R logout(){
        return R.ok();
    }

}